#ifndef OCTNODE_HPP
#define OCTNODE_HPP

#include <QtCore>
#include <Eigen/Core>

using namespace Eigen;

class OctNode {
  public:
    OctNode(OctNode *parent=0);
    ~OctNode();
    int getNumChildren();
    const Vector3i & getPosition() const;
    void setPosition(const Vector3i &pos);
    void setPosition(int x,int y,int z);
    int getSize();
    void setSize(int size);
    int getLevel();
    void setLevel(int level);
    unsigned char getValue();
    void setValue(unsigned char value);
    OctNode * getParent();
    QList<OctNode *> * getChildren();
    void addChild(OctNode *child);
    OctNode * getChild(int i);
    void removeChild(OctNode *child);
    void removeAllChildren();
  private:
    Vector3i pos;
    int size;
    int level;
    unsigned char value;
    OctNode *parent;
    QList<OctNode *> *children;
};

#endif
